CREATE EXTERNAL TABLE IF NOT EXISTS spmi_ods.spmi_operation_global_bill(
id                                                 bigint                         COMMENT 'ID',
operation_financial_center_id                      bigint                         COMMENT '操作财务中心ID',
operation_financial_center_code                    String                         COMMENT '操作财务中心CODE',
operation_financial_center_name                    String                         COMMENT '操作财务中心名称',
waybill_no                                         String                         COMMENT '运单号',
bill_generation_time                               timestamp                      COMMENT '账单产生时间',
bill_generation_date                               String                         COMMENT '账单产生日期',
fee_type_id                                        bigint                         COMMENT '账单子类型ID',
fee_type_code                                      String                         COMMENT '账单子类型名称',
create_time                                        timestamp                      COMMENT 'CURRENT_TIMESTAMP',
update_time                                        timestamp                      COMMENT 'CURRENT_TIMESTAMP',
`__delete_sign__`                                  smallint                       COMMENT '是否删除; 删除 1 ，正常 0'
)
COMMENT '全局索引新表'
PARTITIONED BY (dt STRING COMMENT '更新/创建日期 (yyyy-MM-dd)')
STORED AS PARQUET
LOCATION '/dw/hive/spmi_ods.db/external/spmi_operation_global_bill'
TBLPROPERTIES (
  'parquet.column.index.access'='true'
);